<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">
$(function(){
	$('#MyModuleTree').tree({   
        checkbox: true,   
        url:'<c:url value="/system/module/findModulesTreeData.do"/>',
        onLoadSuccess:function(node, data){
        	<c:forEach items="${Role.modules}" var="m">
	        	var node = $('#MyModuleTree').tree('find', '${m.uuid }');
	        	if(node.attributes == null || node.attributes.puuid != '1'){
	        		$('#MyModuleTree').tree('check', node.target);
	        	}
	        </c:forEach>
        }
   });
});
</script>

<div class="easyui-layout" style="height: 100%;">
		<div region="west" split="true" style="width: 250px;text-align: center; border-left: 0;border-bottom: 0">
			<form id="role_form_" style="margin:0;padding:0">
				<input name="uuid" value="${Role.uuid }" type="hidden">
				<div style="padding-top: 10px;">
					<label>
						角色名称：<input name="name" class="easyui-validatebox" required="true" value="${Role.name }" type="text" style="width: 150px;">
					</label>
				</div>
			</form>
		</div>
	
	<div region="center" style="border-right: 0;border-bottom: 0">
		<ul id="MyModuleTree"></ul>
	</div>
</div>

